import { Authority } from '../request'

const { get, post } = Authority

///////////////////////////  摄像机相关接口

// 查询列表
export const getCameraList = params => get('/equip/camera-info/v1/queryList', { params })

// 获取设备关联的摄像机和传感器列表
export const getCameraListBySensorId = params => get('/equip/device-info/v1/queryDeviceEquip', { params })

// 新增
export const addCamera = params => post('/equip/camera-info/v1/add',  params )

//添加授权
export const addAuthorization = params => post('/equip/camera-info/v1/auth', params)

// 更新
export const updateCamera = params => post('/equip/camera-info/v1/update',  params )

export const getCameraSelectList = params => get('/equip/camera-info/v1/queryIdNameSnList',  { params } )

export const getCamera = params => get('/equip/camera-info/v1/queryOneById',  { params } )


///////////////////////////  传感器相关接口

// 查询列表
export const getSensorList = params => get('/equip/sensor-info/v1/queryList', { params })

// 新增
export const addSensor = params => post('/equip/sensor-info/v1/add',  params )

// 更新
export const updateSensor = params => post('/equip/sensor-info/v1/update',  params )

// 通过路段查设备名称列表
export const getSensorSelectList = params => get('/equip/device-info/v1/queryIdNameSnList', { params })

// 传感器关联摄像机
export const cameraRelation = params => post('/equip/device-associated-camera/v1/addOrUpdate',  params )


///////////////////////////  设备授权相关接口

// 新增
export const addDeviceRoot = params => post('/equip/device-associated-platform/v1/add',  params )

// 取消授权
export const unDeviceRoot = params => post('/equip/device-associated-platform/v1/update',  params )

// 设备运行日志列表
export const equipRecordQueryList = params => get('/equip/equip-record/v1/queryList', { params })
// 设备运行日志统计
export const equipRecordStatic= params => get('/equip/equip-record/v1/statistics', { params })

// 采集仪时间线
export const equipLog= params => get('/equip/equip/v1/statusList', { params })
